#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/socket.h>

int main()
{
    int fd1,fd2,fd3;
    fd1 = socket(PF_INET, SOCK_STREAM, 0);
    fd2 = open("test.txt", O_CREAT | O_WRONLY | O_TRUNC);
    fd3 = socket(PF_INET, SOCK_DGRAM, 0);

    printf("文件描述符1：%d\n", fd1);
    printf("文件描述符2：%d\n", fd2);
    printf("文件描述符3：%d\n", fd3);

    close(fd1);
    close(fd2);
    close(fd3);
    return 0;
}
